/*---------------------------------------------------------------
* RAIBOW FOLDER VARIABLE

* --rainbow-folder-color is a raw rgb variable whose value
* is cycled per child folder in a folder tree.
* Applying "inherit" to every child folder excluding first-order
* child folders results in folders "inheriting" their parent
* folder colors.
*---------------------------------------------------------------*/
.nav-folder-children > .nav-folder,
[data-type="bookmarks"] .tree-item {
	&:nth-child(11n + 2) {
		--rainbow-folder-color: var(--ctp-red);
	}
	&:nth-child(11n + 3) {
		--rainbow-folder-color: var(--ctp-maroon);
	}
	&:nth-child(11n + 4) {
		--rainbow-folder-color: var(--ctp-peach);
	}
	&:nth-child(11n + 5) {
		--rainbow-folder-color: var(--ctp-yellow);
	}
	&:nth-child(11n + 6) {
		--rainbow-folder-color: var(--ctp-green);
	}
	&:nth-child(11n + 7) {
		--rainbow-folder-color: var(--ctp-teal);
	}
	&:nth-child(11n + 8) {
		--rainbow-folder-color: var(--ctp-sky);
	}
	&:nth-child(11n + 9) {
		--rainbow-folder-color: var(--ctp-sapphire);
	}
	&:nth-child(11n + 10) {
		--rainbow-folder-color: var(--ctp-blue);
	}
	&:nth-child(11n + 11) {
		--rainbow-folder-color: var(--ctp-lavender);
	}
	&:nth-child(11n + 12) {
		--rainbow-folder-color: var(--ctp-mauve);
	}
}
.anp-rainbow-subfolder-color-toggle {
	.nav-folder.mod-root .nav-folder.nav-folder .nav-folder,
	[data-type="bookmarks"] .tree-item .tree-item {
		--rainbow-folder-color: inherit;
	}
}
